package com.citywithincity.db.data2db;


import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.citywithincity.db.interfaces.IPsSetter;

/**
 * 实体类的Date转为sql的Date
 * @author randy
 *
 */
class Date2Date implements IPsSetter {


	@Override
	public void setValue(PreparedStatement ps, int index, Object value) throws SQLException {
		if(value==null){
			ps.setObject(index, null);
		}else{
			ps.setDate(index, new java.sql.Date(((java.util.Date)value).getTime()));
		}
		
	}

}
